package org.tea.mapper.common;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.UpdateProvider;
import org.tea.mapper.util.BaseUpdateMapperProvider;

import java.util.List;

/**
 * 通用更新方法
 *
 *@author lxh
 */
@Mapper
public interface BaseUpdateMapper<T> {

    @UpdateProvider(type = BaseUpdateMapperProvider.class, method = "updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(@Param("param") T row);

    @UpdateProvider(type = BaseUpdateMapperProvider.class, method = "updateSelectiveBYPrimaryKeyBatch")
    int updateSelectiveBYPrimaryKeyBatch(@Param("param") List<? extends T> updateRowList);
}
